Skip to content

Add shared test infrastructure and wire FS into extensions - #20

Merged
TsekNet merged 1 commit into
mainfrom
testutil-helpers
Apr 12, 2026
Merged

TsekNet merged 1 commit into
mainfrom
testutil-helpers

Conversation

@TsekNet

@TsekNet TsekNet commented Apr 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add AssertConverges, AssertInSync, AssertDrifted helpers to internal/testutil/
  • Add MockCmd for testable exec.Command injection
  • Add MockPackageManager for package extension tests
  • Wire extensions.FS into template, sysctl, cron, repository, hostname
  • Add MapFS-based tests for all newly wired extensions
  • Document testutil in CONTRIBUTING.md

Test plan

  • go build ./... passes
  • go test -race ./... passes
  • go vet ./... clean
  • New MapFS tests exercise Check/Apply without touching real filesystem

Closes #19

Add AssertConverges, MockCmd, MockPackageManager to internal/testutil.
Wire extensions.FS into template, sysctl, cron, repository, hostname.
Add MapFS-based tests for all wired extensions. Document testutil in
CONTRIBUTING.md.

Closes #19
@TsekNet
TsekNet merged commit 3eb6e1d into main Apr 12, 2026
1 check passed
@TsekNet
TsekNet deleted the testutil-helpers branch April 12, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add shared test infrastructure and wire FS into remaining extensions

1 participant